from django.db import models
from django.contrib.auth.models import User
from Scope.thumbs import ImageWithThumbsField

class Colaborador(models.Model):
    user = models.ForeignKey(User, unique=True)
    nome = models.CharField(max_length=50)
    igreja = models.CharField(max_length=50)
    email = models.CharField(max_length=50)
    telefone = models.CharField(max_length=12)
    twitter = models.URLField(max_length=50, blank=True, null=True, verify_exists=False)
    facebook = models.URLField(max_length=50, blank=True, null=True, verify_exists=False)
    googleplus = models.URLField(max_length=50, blank=True, null=True, default="https://plus.google.com/117251973452118308738", verify_exists=False)
    dataentrada = models.DateField(auto_now_add=True)
    foto = ImageWithThumbsField('Imagem Destaque', upload_to='arquivos/colaborador/', sizes=((32,32),(263,172),(640,480)))
    def __unicode__(self):
        return self.nome